package com.auth.practice.application.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;

/**
 * @author Ldanniel
 * @description :
 * @date 2022/11/04 20:38
 * @since open jdk 1.8
 */
@RestController
public class UserController {
    @Autowired
    private PolicyScanner policyScanner;
    @Autowired
    private PolicyDispatcher dispatcher;
    @PostMapping("/getAnnotations")
    public void getAnnotations()  {
        try {
            Map<String, Object> dataMap = policyScanner.scanner();
            dispatcher.dispatcher(dataMap);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
